<?php

require_once(sfConfig::get('sf_lib_dir').'/filter/base/BaseFormFilterPropel.class.php');

/**
 * ProductLine filter form base class.
 *
 * @package    wifilez
 * @subpackage filter
 * @author     Your name here
 * @version    SVN: $Id: sfPropelFormFilterGeneratedTemplate.php 16976 2009-04-04 12:47:44Z fabien $
 */
class BaseProductLineFormFilter extends BaseFormFilterPropel
{
  public function setup()
  {
    $this->setWidgets(array(
      'title'           => new sfWidgetFormFilterInput(),
      'sku'             => new sfWidgetFormFilterInput(),
      'content_id'      => new sfWidgetFormFilterInput(),
      'platform_id'     => new sfWidgetFormFilterInput(),
      'description'     => new sfWidgetFormFilterInput(),
      'publisher_id'    => new sfWidgetFormFilterInput(),
    ));

    $this->setValidators(array(
      'title'           => new sfValidatorPass(array('required' => false)),
      'sku'             => new sfValidatorPass(array('required' => false)),
      'content_id'      => new sfValidatorSchemaFilter('text', new sfValidatorInteger(array('required' => false))),
      'platform_id'     => new sfValidatorSchemaFilter('text', new sfValidatorInteger(array('required' => false))),
      'description'     => new sfValidatorPass(array('required' => false)),
      'publisher_id'    => new sfValidatorSchemaFilter('text', new sfValidatorInteger(array('required' => false))),
    ));

    $this->widgetSchema->setNameFormat('product_line_filters[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    parent::setup();
  }

  public function getModelName()
  {
    return 'ProductLine';
  }

  public function getFields()
  {
    return array(
      'product_line_id' => 'Number',
      'title'           => 'Text',
      'sku'             => 'Text',
      'content_id'      => 'Number',
      'platform_id'     => 'Number',
      'description'     => 'Text',
      'publisher_id'    => 'Number',
    );
  }
}
